#include "widget_menu_background.h"

widget_menu_background::widget_menu_background(QWidget *parent) : QWidget(parent)
{
    
}

void widget_menu_background::paintEvent(QPaintEvent *event)
{
    // 不使用这个变量
    Q_UNUSED (event);
    
    // 背景为浅蓝色
    QPainter painter(this);
    
    QPen pen;
    pen.setColor(QColor(42, 75, 124));
    pen.setWidth(0);
    
    // 设置画刷
    QBrush Brush;
    Brush.setColor(QColor(42, 75, 124));
    Brush.setStyle(Qt::SolidPattern);
    
    // 设定画笔 画刷
    painter.setPen(pen);
    painter.setBrush(Brush);
    
    // 绘制图形
    painter.drawRoundedRect(this->rect() , 10 , 10);
}
